﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
namespace BLL
{
    public class UserBll : BaseBll<MODEL.User>
    {
        private const string _type = "UserDal";
        private IDAL.IUserDal _dal;
        public UserBll()
            : base(_type)
        {
            _dal = base.dal as IDAL.IUserDal;
            if (_dal == null)
            {
                throw new NullReferenceException(_type);
            }
        }
        ///注册
        public int userReegister(MODEL.User m)
        {
            return _dal.userReegister(m);
        }
        /// <summary>
        /// 登录
        /// </summary>
        /// <param name="m"></param>
        /// <returns></returns>
        public int userLogin(MODEL.User m)
        {
            return _dal.userLogin(m);
        }
        /// <summary>
        /// 查询密码
        /// </summary>
        /// <param name="email"></param>
        /// <returns></returns>
        public int userselid(string upwd)
        {
            return _dal.userselid(upwd);
        }
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="m"></param>
        /// <returns></returns>
        public int userupdate(MODEL.User m)
        {
            return _dal.userupdate(m);
        }

      
    }
}
